package com.jrx.anytxn.investor.service;

import com.jrx.anytxn.common.exception.TxnBizException;
import com.jrx.anytxn.common.exception.TxnException;
import com.jrx.anytxn.investor.bean.*;
import com.jrx.anytxn.investor.entity.AmDelinquencyInvestorInfo;
import com.jrx.anytxn.investor.entity.AmLoanAccountInvestorInfo;
import com.jrx.anytxn.investor.entity.AmRepaymentPlanInvestorInfo;
import com.jrx.anytxn.investor.entity.BtInvestorDelqList;

import java.util.Date;

/**
 * 延滞处理接口
 *
 * @author liuyang
 * @date 2020-05-26
 **/
public interface IInvestorDealDelqService {

    /**
     * 构建延滞处理列表
     *
     * @param plan 还款计划
     * @param businessDate 业务日期
     * @return BtInvestorDelqList 延滞待处理列表
     * @throws TxnBizException
     * @author liuyang
     * @date 2020-05-26
     */
    BtInvestorDelqList buildBtDelqList(AmRepaymentPlanInvestorInfo plan, Date businessDate) throws TxnBizException;

    /**
     * 构建延滞处理列表
     *
     * @param delq 延滞信息
     * @param businessDate 业务日期
     * @return BtInvestorDelqList 延滞待处理列表
     * @throws TxnBizException
     * @author liuyang
     * @date 2020-05-26
     */
    BtInvestorDelqList buildBtDelqList(AmDelinquencyInvestorInfo delq, Date businessDate) throws TxnBizException;

    /**
     * 延滞处理
     *
     * @param bean
     * @return InvestorDelqSaveBean 延滞处理更新信息
     * @throws TxnBizException
     * @author liuyang
     * @date 2020-05-26
     */
    InvestorDelqSaveBean dealDelq(InvestorDealDelqBean bean) throws TxnException;

    /**
     * 延滞外转列处理 会计状态升级，转非应计，五级分类升级
     *
     * @param dealTransOutBean
     * @return InvestorDelqTransOutSaveBean 延滞会计处理更新信息
     * @throws TxnException
     * @author liuyang
     * @date 2020-05-26
     */
    InvestorDelqTransOutSaveBean dealDelqTransOut(InvestorDealTransOutBean dealTransOutBean) throws TxnException;

    /**
     * 延滞内转列处理 会计状态降级，转应计，五级分类降级
     *
     * @param dealTransInBean
     * @return InvestorDelqTransInSaveBean 延滞会计处理更新信息
     * @throws TxnException
     * @author liuyang
     * @date 2020-05-26
     */
    InvestorDelqTransInSaveBean dealDelqTransIn(InvestorDealTransInBean dealTransInBean) throws TxnException;
}
